﻿@model IEnumerable<Common.Views.StatisticalView>
@if (Model.Count() > 0)
{
    <br /> <div style="color: Black"><b>Most Purchased Item:</b></div> <br />
    <table>
    <tr>
        <th>Product Name</th>
        <th>Features</th>
        <th>Image</th>
        <th>Total Quantity</th>
    </tr>

    @foreach (var item in Model)
    {
    <tr>
        <td>@Html.DisplayFor(modelItem => item.ProductName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Features)
        </td>
        <td>
            <img height="150px" width="150px" src= "@Url.Content(item.ImageLink)" alt="@Html.DisplayFor(modelItem => item.ImageLink)" />
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TotalQty)
        </td>
    </tr>
    }
    </table>
}
else
{
    <br /> <div style="color:Red"><b>No products that were most purchased were found</b></div>
}